<?php
require '../../mainfile.php';
require_once XOOPS_MODULE_PATH. '/scuttle/include/SqlUtilty.php';
$root =& XCube_Root::getSingleton();

$hasPermission = $root->mContext->mUser->isInRole('Module.scuttle.Admin') ;

header('Content-Type: text/xml; charset=UTF-8');
header('Last-Modified: '. gmdate("D, d M Y H:i:s") .' GMT');
header('Cache-Control: no-cache, must-revalidate');

$getId = intval($_GET['id']);

if ($hasPermission) {
	$result = deleteBookmark($getId);
} else {
	$result = 'Failed to delete bookmark';
}

//die();
?>
<response>
  <method>deleteConfirmed</method>
  <result><?php echo $result; ?></result>
</response>